home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 17644 < prev    next >
Mailbox/MIME Entity  |  1996-08-05  |  2.7 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news, ASCII text default
100% checkBytes Printable ASCII default
100% dexmagic PrintFox/Pagefox WEAK default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/news default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 6e 6e | 74 70 2e 65 61 72 74 68 |Path: nn|tp.earth|
|00000010| 6c 69 6e 6b 2e 6e 65 74 | 21 75 73 65 6e 65 74 0a |link.net|!usenet.|
|00000020| 46 72 6f 6d 3a 20 44 61 | 76 69 64 20 52 69 65 64 |From: Da|vid Ried|
|00000030| 65 6c 20 3c 73 69 6c 6b | 63 69 74 79 32 40 65 61 |el <silk|city2@ea|
|00000040| 72 74 68 6c 69 6e 6b 2e | 6e 65 74 3e 0a 4e 65 77 |rthlink.|net>.New|
|00000050| 73 67 72 6f 75 70 73 3a | 20 63 6f 6d 70 2e 73 79 |sgroups:| comp.sy|
|00000060| 73 2e 6d 61 63 2e 70 72 | 6f 67 72 61 6d 6d 65 72 |s.mac.pr|ogrammer|
|00000070| 2e 63 6f 64 65 77 61 72 | 72 69 6f 72 2c 63 6f 6d |.codewar|rior,com|
|00000080| 70 2e 6c 61 6e 67 2e 63 | 2b 2b 2c 64 6d 75 2e 6c |p.lang.c|++,dmu.l|
|00000090| 61 6e 67 2e 63 2b 2b 0a | 53 75 62 6a 65 63 74 3a |ang.c++.|Subject:|
|000000a0| 20 52 65 3a 20 53 54 4c | 20 69 6e 70 75 74 20 69 | Re: STL| input i|
|000000b0| 74 65 72 61 74 6f 72 73 | 0a 44 61 74 65 3a 20 54 |terators|.Date: T|
|000000c0| 75 65 2c 20 31 36 20 41 | 70 72 20 31 39 39 36 20 |ue, 16 A|pr 1996 |
|000000d0| 31 39 3a 30 37 3a 33 35 | 20 2d 30 34 30 30 0a 4f |19:07:35| -0400.O|
|000000e0| 72 67 61 6e 69 7a 61 74 | 69 6f 6e 3a 20 53 69 6c |rganizat|ion: Sil|
|000000f0| 6b 20 43 69 74 79 20 53 | 6f 66 74 77 61 72 65 20 |k City S|oftware |
|00000100| 49 6e 63 2e 0a 4d 65 73 | 73 61 67 65 2d 49 44 3a |Inc..Mes|sage-ID:|
|00000110| 20 3c 33 31 37 34 32 38 | 33 37 2e 36 31 39 32 40 | <317428|37.6192@|
|00000120| 65 61 72 74 68 6c 69 6e | 6b 2e 6e 65 74 3e 0a 52 |earthlin|k.net>.R|
|00000130| 65 66 65 72 65 6e 63 65 | 73 3a 20 3c 33 31 37 33 |eference|s: <3173|
|00000140| 30 42 46 44 2e 31 32 45 | 40 64 6d 75 2e 61 63 2e |0BFD.12E|@dmu.ac.|
|00000150| 75 6b 3e 0a 4e 4e 54 50 | 2d 50 6f 73 74 69 6e 67 |uk>.NNTP|-Posting|
|00000160| 2d 48 6f 73 74 3a 20 70 | 6f 6f 6c 30 33 35 2e 6d |-Host: p|ool035.m|
|00000170| 61 78 32 32 2e 6e 65 77 | 2d 79 6f 72 6b 2e 6e 79 |ax22.new|-york.ny|
|00000180| 2e 64 79 6e 69 70 2e 61 | 6c 74 65 72 2e 6e 65 74 |.dynip.a|lter.net|
|00000190| 0a 4d 69 6d 65 2d 56 65 | 72 73 69 6f 6e 3a 20 31 |.Mime-Ve|rsion: 1|
|000001a0| 2e 30 0a 43 6f 6e 74 65 | 6e 74 2d 54 79 70 65 3a |.0.Conte|nt-Type:|
|000001b0| 20 74 65 78 74 2f 70 6c | 61 69 6e 3b 20 63 68 61 | text/pl|ain; cha|
|000001c0| 72 73 65 74 3d 75 73 2d | 61 73 63 69 69 0a 43 6f |rset=us-|ascii.Co|
|000001d0| 6e 74 65 6e 74 2d 54 72 | 61 6e 73 66 65 72 2d 45 |ntent-Tr|ansfer-E|
|000001e0| 6e 63 6f 64 69 6e 67 3a | 20 37 62 69 74 0a 58 2d |ncoding:| 7bit.X-|
|000001f0| 4d 61 69 6c 65 72 3a 20 | 4d 6f 7a 69 6c 6c 61 20 |Mailer: |Mozilla |
|00000200| 32 2e 30 31 20 28 4d 61 | 63 69 6e 74 6f 73 68 3b |2.01 (Ma|cintosh;|
|00000210| 20 49 3b 20 36 38 4b 29 | 0a 54 6f 3a 20 43 68 72 | I; 68K)|.To: Chr|
|00000220| 69 73 74 6f 70 68 65 72 | 20 50 69 6c 73 77 6f 72 |istopher| Pilswor|
|00000230| 74 68 20 3c 68 63 6d 39 | 34 63 70 40 64 6d 75 2e |th <hcm9|4cp@dmu.|
|00000240| 61 63 2e 75 6b 3e 0a 0a | 43 68 72 69 73 74 6f 70 |ac.uk>..|Christop|
|00000250| 68 65 72 20 50 69 6c 73 | 77 6f 72 74 68 20 77 72 |her Pils|worth wr|
|00000260| 6f 74 65 3a 0a 3e 20 0a | 3e 20 48 69 20 74 68 65 |ote:.> .|> Hi the|
|00000270| 72 65 2c 0a 3e 20 0a 3e | 20 49 20 61 6d 20 6c 6f |re,.> .>| I am lo|
|00000280| 6f 6b 69 6e 67 20 66 6f | 72 20 73 6f 6d 65 6f 6e |oking fo|r someon|
|00000290| 65 20 77 68 6f 20 63 61 | 6e 20 68 65 6c 70 20 6d |e who ca|n help m|
|000002a0| 65 20 77 69 74 68 20 73 | 6f 6d 65 20 53 54 4c 20 |e with s|ome STL |
|000002b0| 73 74 75 66 66 2e 0a 3e | 20 49 20 68 61 76 65 20 |stuff..>| I have |
|000002c0| 63 68 65 63 6b 65 64 20 | 6f 75 74 20 61 20 6c 6f |checked |out a lo|
|000002d0| 74 20 6f 66 20 74 68 65 | 20 77 65 62 2f 66 74 70 |t of the| web/ftp|
|000002e0| 20 73 69 74 65 73 20 66 | 6f 72 20 72 65 6c 65 76 | sites f|or relev|
|000002f0| 61 6e 74 20 63 6f 64 65 | 20 62 75 74 20 68 61 76 |ant code| but hav|
|00000300| 65 0a 3e 20 73 6f 20 66 | 61 72 20 62 65 65 6e 20 |e.> so f|ar been |
|00000310| 75 6e 61 62 6c 65 20 74 | 6f 20 66 69 6e 64 20 61 |unable t|o find a|
|00000320| 6e 79 2e 0a 3e 20 0a 3e | 20 49 20 62 6f 75 67 68 |ny..> .>| I bough|
|00000330| 74 20 61 20 62 6f 6f 6b | 20 74 68 65 20 6f 74 68 |t a book| the oth|
|00000340| 65 72 20 64 61 79 20 74 | 68 61 74 20 73 68 6f 77 |er day t|hat show|
|00000350| 65 64 20 68 6f 77 20 74 | 6f 20 75 73 65 20 69 6e |ed how t|o use in|
|00000360| 70 75 74 20 61 6e 64 20 | 6f 75 74 70 75 74 0a 3e |put and |output.>|
|00000370| 20 69 74 65 72 61 74 6f | 72 73 20 74 6f 20 77 72 | iterato|rs to wr|
|00000380| 69 74 65 20 63 6f 6e 74 | 61 69 6e 65 72 73 20 28 |ite cont|ainers (|
|00000390| 74 68 65 20 65 78 61 6d | 70 6c 65 20 77 61 73 20 |the exam|ple was |
|000003a0| 61 20 76 65 63 74 6f 72 | 29 20 74 6f 20 64 69 73 |a vector|) to dis|
|000003b0| 6b 2e 20 20 49 74 0a 3e | 20 6c 6f 6f 6b 65 64 20 |k. It.>| looked |
|000003c0| 65 78 74 72 65 6d 65 6c | 79 20 73 69 6d 70 6c 65 |extremel|y simple|
|000003d0| 2e 20 20 48 6f 77 65 76 | 65 72 20 74 68 65 20 63 |. Howev|er the c|
|000003e0| 6f 6d 70 69 6c 65 72 20 | 64 69 64 6e 27 74 20 6c |ompiler |didn't l|
|000003f0| 69 6b 65 20 69 74 2e 0a | 3e 20 0a 3e 20 54 68 65 |ike it..|> .> The|
|00000400| 20 6d 65 74 68 6f 64 20 | 73 65 65 6d 73 20 74 6f | method |seems to|
|00000410| 20 77 6f 72 6b 20 77 69 | 74 68 20 61 20 73 74 61 | work wi|th a sta|
|00000420| 6e 64 61 72 64 20 6f 73 | 74 72 65 61 6d 20 6f 72 |ndard os|tream or|
|00000430| 20 69 73 74 72 65 61 6d | 20 28 63 69 6e 2f 63 6f | istream| (cin/co|
|00000440| 75 74 29 0a 3e 20 62 75 | 74 20 64 69 64 20 6e 6f |ut).> bu|t did no|
|00000450| 74 20 77 6f 72 6b 20 77 | 68 65 6e 20 67 69 76 65 |t work w|hen give|
|00000460| 6e 20 61 20 69 66 73 74 | 72 65 61 6d 20 6f 72 20 |n a ifst|ream or |
|00000470| 6f 66 73 74 72 65 61 6d | 20 61 73 20 69 6e 20 74 |ofstream| as in t|
|00000480| 68 65 20 62 6f 6f 6b 2e | 0a 3e 20 0a 3e 20 49 20 |he book.|.> .> I |
|00000490| 6e 65 65 64 20 74 68 69 | 73 20 63 6f 64 65 20 75 |need thi|s code u|
|000004a0| 72 67 65 6e 74 6c 79 20 | 61 73 20 69 74 20 73 65 |rgently |as it se|
|000004b0| 65 6d 73 20 74 68 65 20 | 62 65 73 74 20 77 61 79 |ems the |best way|
|000004c0| 20 74 6f 20 6d 61 6e 61 | 67 65 20 69 6e 64 65 78 | to mana|ge index|
|000004d0| 65 73 20 74 6f 0a 3e 20 | 6d 79 20 64 61 74 61 20 |es to.> |my data |
|000004e0| 66 69 6c 65 73 20 61 6e | 64 20 74 68 65 20 64 65 |files an|d the de|
|000004f0| 61 64 6c 69 6e 65 20 69 | 73 20 69 6e 20 74 77 6f |adline i|s in two|
|00000500| 20 77 65 65 6b 73 20 74 | 69 6d 65 2e 0a 3e 20 0a | weeks t|ime..> .|
|00000510| 3e 20 54 68 65 20 63 6f | 64 65 20 69 6e 20 74 68 |> The co|de in th|
|00000520| 65 20 62 6f 6f 6b 20 6c | 6f 6f 6b 65 64 20 6b 69 |e book l|ooked ki|
|00000530| 6e 64 20 6f 66 20 6c 69 | 6b 65 20 74 68 69 73 3a |nd of li|ke this:|
|00000540| 0a 3e 20 0a 3e 20 69 66 | 73 74 72 65 61 6d 20 6d |.> .> if|stream m|
|00000550| 79 69 6e 20 28 22 69 6e | 66 69 6c 65 22 29 3b 0a |yin ("in|file");.|
|00000560| 3e 20 6f 66 73 74 72 65 | 61 6d 20 6d 79 6f 75 74 |> ofstre|am myout|
|00000570| 28 22 6f 75 74 66 69 6c | 65 29 3b 0a 3e 20 0a 3e |("outfil|e);.> .>|
|00000580| 20 69 73 74 72 65 61 6d | 5f 69 74 65 72 61 74 6f | istream|_iterato|
|00000590| 72 3c 63 68 61 72 3e 20 | 69 6e 70 75 74 5f 69 74 |r<char> |input_it|
|000005a0| 65 72 28 6d 79 69 6e 29 | 2c 20 65 6f 73 3b 0a 3e |er(myin)|, eos;.>|
|000005b0| 20 6f 73 74 72 65 61 6d | 5f 69 74 65 72 61 74 6f | ostream|_iterato|
|000005c0| 72 3c 63 68 61 72 3e 20 | 6f 75 74 70 75 74 5f 69 |r<char> |output_i|
|000005d0| 74 65 72 28 6d 79 6f 75 | 74 29 3b 0a 3e 20 0a 3e |ter(myou|t);.> .>|
|000005e0| 20 76 65 63 74 6f 72 3c | 63 68 61 72 3e 20 6d 79 | vector<|char> my|
|000005f0| 76 65 63 74 6f 72 20 2e | 2e 2e 65 74 63 2e 20 65 |vector .|..etc. e|
|00000600| 74 63 2e 0a 3e 20 2e 2e | 2e 0a 3e 20 28 54 68 69 |tc..> ..|..> (Thi|
|00000610| 73 20 69 73 20 70 72 6f | 62 61 62 6c 79 20 77 72 |s is pro|bably wr|
|00000620| 6f 6e 67 20 62 75 74 20 | 69 73 20 74 68 65 72 65 |ong but |is there|
|00000630| 20 6a 75 73 74 20 74 6f | 20 67 69 76 65 20 74 68 | just to| give th|
|00000640| 65 20 6a 69 73 74 29 0a | 3e 20 0a 3e 20 54 68 65 |e jist).|> .> The|
|00000650| 20 70 72 6f 62 6c 65 6d | 20 77 61 73 20 6f 6e 20 | problem| was on |
|00000660| 74 68 65 20 74 68 69 72 | 64 20 6c 69 6e 65 20 6f |the thir|d line o|
|00000670| 66 20 63 6f 64 65 2e 20 | 54 68 65 20 65 72 72 6f |f code. |The erro|
|00000680| 72 20 6d 65 73 73 61 67 | 65 20 77 61 73 20 22 69 |r messag|e was "i|
|00000690| 6c 6c 65 67 61 6c 0a 3e | 20 74 65 6d 70 6c 61 74 |llegal.>| templat|
|000006a0| 65 20 61 72 67 75 6d 65 | 6e 74 73 22 2e 20 20 49 |e argume|nts". I|
|000006b0| 20 68 61 76 65 20 63 68 | 65 63 6b 65 64 20 6f 76 | have ch|ecked ov|
|000006c0| 65 72 20 61 6e 64 20 6f | 76 65 72 20 74 68 61 74 |er and o|ver that|
|000006d0| 20 74 68 65 20 74 65 78 | 74 20 77 61 73 0a 3e 20 | the tex|t was.> |
|000006e0| 69 64 65 6e 74 69 63 61 | 6c 20 74 6f 20 74 68 61 |identica|l to tha|
|000006f0| 74 20 6f 66 20 74 68 65 | 20 62 6f 6f 6b 2c 20 62 |t of the| book, b|
|00000700| 75 74 20 73 74 69 6c 6c | 20 6e 6f 20 6a 6f 79 21 |ut still| no joy!|
|00000710| 0a 3e 20 0a 3e 20 44 6f | 65 73 20 74 68 65 20 53 |.> .> Do|es the S|
|00000720| 54 4c 20 73 75 70 70 6c | 69 65 64 20 77 69 74 68 |TL suppl|ied with|
|00000730| 20 74 68 65 20 4d 65 74 | 72 6f 77 65 72 6b 73 20 | the Met|rowerks |
|00000740| 43 6f 64 65 77 61 72 72 | 69 6f 72 20 38 20 6e 6f |Codewarr|ior 8 no|
|00000750| 74 20 6c 69 6b 65 20 66 | 73 74 72 65 61 6d 73 0a |t like f|streams.|
|00000760| 3e 20 61 73 20 61 72 67 | 75 6d 65 6e 74 73 20 74 |> as arg|uments t|
|00000770| 6f 20 74 68 69 73 20 74 | 65 6d 70 6c 61 74 65 2e |o this t|emplate.|
|00000780| 0a 3e 20 0a 3e 20 49 27 | 6d 20 73 6f 72 72 79 20 |.> .> I'|m sorry |
|00000790| 74 68 61 74 20 49 20 63 | 61 6e 20 6e 6f 74 20 73 |that I c|an not s|
|000007a0| 75 70 70 6c 79 20 6d 79 | 20 63 6f 64 65 20 61 73 |upply my| code as|
|000007b0| 20 49 20 61 6d 20 69 6e | 20 75 6e 69 76 65 72 73 | I am in| univers|
|000007c0| 69 74 79 20 61 6e 64 20 | 74 68 65 0a 3e 20 63 6f |ity and |the.> co|
|000007d0| 64 65 20 69 73 20 61 74 | 20 68 6f 6d 65 2e 20 20 |de is at| home. |
|000007e0| 41 6e 79 20 68 69 6e 74 | 73 20 6f 6e 20 6d 61 6b |Any hint|s on mak|
|000007f0| 69 6e 67 20 63 6f 6e 74 | 61 69 6e 65 72 73 20 70 |ing cont|ainers p|
|00000800| 65 72 73 69 73 74 65 6e | 74 20 28 61 6e 79 20 77 |ersisten|t (any w|
|00000810| 61 79 29 0a 3e 20 77 6f | 75 6c 64 20 62 65 20 76 |ay).> wo|uld be v|
|00000820| 65 72 79 20 67 72 61 74 | 65 66 75 6c 6c 79 20 72 |ery grat|efully r|
|00000830| 65 63 69 65 76 65 64 2e | 0a 3e 20 0a 3e 20 74 68 |ecieved.|.> .> th|
|00000840| 61 6e 6b 79 6f 75 20 69 | 6e 20 61 64 76 61 6e 63 |ankyou i|n advanc|
|00000850| 65 0a 3e 20 0a 3e 20 72 | 65 67 61 72 64 73 0a 3e |e.> .> r|egards.>|
|00000860| 20 0a 3e 20 43 68 72 69 | 73 74 6f 70 68 65 72 20 | .> Chri|stopher |
|00000870| 50 69 6c 73 77 6f 72 74 | 68 0a 3e 20 48 43 4d 39 |Pilswort|h.> HCM9|
|00000880| 34 43 50 40 64 6d 75 2e | 61 63 2e 75 6b 0a 3e 20 |4CP@dmu.|ac.uk.> |
|00000890| 50 53 3a 20 50 6c 65 61 | 73 65 20 63 6f 75 6c 64 |PS: Plea|se could|
|000008a0| 20 72 65 70 6c 69 65 73 | 20 62 65 20 43 43 27 64 | replies| be CC'd|
|000008b0| 20 74 6f 20 74 68 65 20 | 61 62 6f 76 65 20 65 2d | to the |above e-|
|000008c0| 6d 61 69 6c 20 61 64 64 | 72 65 73 73 20 61 73 20 |mail add|ress as |
|000008d0| 49 0a 3e 20 73 6f 6d 65 | 74 69 6d 65 73 20 68 61 |I.> some|times ha|
|000008e0| 76 65 20 70 72 6f 62 6c | 65 6d 73 20 77 69 74 68 |ve probl|ems with|
|000008f0| 20 6d 79 20 6e 65 77 73 | 20 72 65 61 64 65 72 2e | my news| reader.|
|00000900| 20 54 68 61 6e 6b 73 0a | 0a 0a 0a 43 68 72 69 73 | Thanks.|...Chris|
|00000910| 2c 0a 0a 54 68 65 20 4d | 57 20 63 6f 6d 70 69 6c |,..The M|W compil|
|00000920| 65 72 20 64 6f 65 73 20 | 6e 6f 74 20 79 65 74 20 |er does |not yet |
|00000930| 73 75 70 70 6f 72 74 20 | 64 65 66 61 75 6c 74 20 |support |default |
|00000940| 74 65 6d 70 6c 61 74 65 | 20 61 72 67 75 6d 65 6e |template| argumen|
|00000950| 74 73 2e 0a 0a 59 6f 75 | 20 6e 65 65 64 20 74 6f |ts...You| need to|
|00000960| 20 63 6f 64 65 20 73 6f | 6d 65 74 68 69 6e 67 20 | code so|mething |
|00000970| 6c 69 6b 65 20 74 68 69 | 73 3a 0a 0a 69 73 74 72 |like thi|s:..istr|
|00000980| 65 61 6d 5f 69 74 65 72 | 61 74 6f 72 3c 49 6e 70 |eam_iter|ator<Inp|
|00000990| 75 74 52 65 63 6f 72 64 | 2c 20 70 74 72 64 69 66 |utRecord|, ptrdif|
|000009a0| 66 5f 74 3e 20 69 6e 70 | 75 74 46 69 6c 65 5f 69 |f_t> inp|utFile_i|
|000009b0| 74 6f 72 28 69 6e 70 75 | 74 46 69 6c 65 29 3b 0a |tor(inpu|tFile);.|
|000009c0| 0a 77 68 65 72 65 20 70 | 74 72 64 69 66 66 5f 74 |.where p|trdiff_t|
|000009d0| 20 69 73 20 61 20 74 79 | 70 65 2e 20 4d 57 20 61 | is a ty|pe. MW a|
|000009e0| 6c 72 65 61 64 79 20 6b | 6e 6f 77 73 20 61 62 6f |lready k|nows abo|
|000009f0| 75 74 20 70 74 72 64 69 | 66 66 5f 74 20 73 6f 20 |ut ptrdi|ff_t so |
|00000a00| 6a 75 73 74 20 63 6f 64 | 65 20 0a 69 74 20 61 73 |just cod|e .it as|
|00000a10| 20 69 73 2e 20 20 54 68 | 65 20 61 72 67 75 6d 65 | is. Th|e argume|
|00000a20| 6e 74 20 74 6f 20 74 68 | 65 20 63 6f 6e 73 74 72 |nt to th|e constr|
|00000a30| 75 63 74 6f 72 20 69 73 | 20 6f 66 20 63 6f 75 72 |uctor is| of cour|
|00000a40| 73 65 20 74 68 65 20 73 | 74 72 65 61 6d 20 79 6f |se the s|tream yo|
|00000a50| 75 20 0a 61 72 65 20 69 | 74 65 72 61 74 69 6e 67 |u .are i|terating|
|00000a60| 20 6f 6e 2e 0a 0a 48 6f | 70 65 20 74 68 69 73 20 | on...Ho|pe this |
|00000a70| 68 65 6c 70 73 2e 0a 0a | 44 61 76 65 20 52 69 65 |helps...|Dave Rie|
|00000a80| 64 65 6c 0a 53 69 6c 6b | 20 43 69 74 79 20 53 6f |del.Silk| City So|
|00000a90| 66 74 77 61 72 65 20 49 | 6e 63 2e 0a |ftware I|nc.. |
+--------+-------------------------+-------------------------+--------+--------+